//	获取元素对象	
function g(id){return document.getElementById(id);}

// 添加权限
function addAuth(){
	var mask = g("mask");
	var auth = g("auth");
	
	var bodyW = document.documentElement.clientWidth;
	var bodyH = document.documentElement.clientHeight;
	
	//自动扩展元素到全部显示区域
	mask.style.width = bodyW + "px";
	mask.style.height = bodyH + "px";
	mask.style.display = "block";
	
	auth.style.display = "block";
}

//滚动条事件触发扩展元素到全部显示区域
window.onscroll = function(){
	var mask = g("mask");
	mask.style.height = document.body.scrollHeight;
}

//取消权限
function authClose(){
	var mask = g("mask");
	var auth = g("auth");
	
	mask.style.display = "none";
	auth.style.display = "none";
}